#include <string>
#include <iostream>
#include <cstring>
#include <map>
#include <vector>
#include "main.h"
#include "test.h"
#include "recognize.h"
#include "command.h"
using namespace std;


// 注册指令
SUI::Tragers CommandTragers = {
    {"getInfo", getInfo},
    {"Run", runFunc},
    {"touch", touch},
    {"cat", cat},

};


// 循环指定
int recognizeLoop()
{
    cout << "Note: If you want to leave, press Ctrl+D\n" << endl;
    string str;
    int commandFlag = 0;
    while(!cin.eof() && commandFlag != 0xFF)
    {
        cout << "(SimpleUI)> ";
        getline(cin, str);
        // commandFlag = recognizeFromStr(str);
        CommandTragers.Match(str);
        cout << endl;
    }
    cout << endl;
}